package sg.edu.nus.iss.vmcs.languagesupport;

import java.util.Properties;

import sg.edu.nus.iss.vmcs.system.Environment;
import sg.edu.nus.iss.vmcs.util.VMCSException;

public class LanguagePropertyFactory {
	LanguagePropertyBuilder builder = null;
	
	public Properties getProperties() throws VMCSException{
		if ("EN".equalsIgnoreCase(Environment.getLanguage())) {
			builder = new EnglishLanguagePropertyBuilder();
		} else if ("CH".equalsIgnoreCase(Environment.getLanguage())) {
			builder = new ChineseLanguagePropertyBuilder();
		} else {
			throw new VMCSException();
		}
		return builder.loadProperty();
	}

}
